<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>预约详情</title>
    <link rel="stylesheet" href="../css/page-health-orderDetail.css"/>
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script>
        var setmealId = getUrlParam("setmealId");
        var memberId = getUrlParam("memberId");

    </script>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>


    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="card">

            <div class="project-img">
                <img :src="imgUrl" width="100%" height="100%"/>
                <p>套餐姓名:{{setmeal.setmealname}}</p>
                <p>套餐价格:{{setmeal.price}}</p>
                <p>{{setmeal.sex}} {{setmeal.age}}</p>

            </div>
            <div class="project-text">
                <h4 class="tit">预约人:{{setmeal.membtername}}</h4>
                <p class="subtit">预约方式:{{setmeal.orderType}}</p>
                <p class="subtit">预约时间:{{setmeal.orderDate}}</p>
                <p class="subtit">到诊情况:{{setmeal.orderStatus}}</p>
                <p class="subtit">体检机构地址:北京</p>
            </div>
            <button type="button" @click="toOrderInfo()">查看所有套餐</button>
        </div>

    </div>
</div>
<script>
    var vue = new Vue({
        el: '#app',
        data: {
            imgUrl: null,//套餐对应的图片链接
            setmeal: []
        },
        methods: {
            toOrderInfo() {
                window.location.href = "1menus_test.html";
            }
        },
        <!--钩子函数，可以看成是页面加载时就进行加载，实际上和VUE的生命周期有关-->
        mounted() {
            axios.post("/2menus/findBymemberIdAndsetmealId.do?memberId=" + memberId+"&setmealId="+setmealId).then((response) => {
                if (response.data.flag) {
                    this.setmeal = response.data.data[0];
                    alert(response.data.data[0].img)
                    this.imgUrl = 'http://qjhg2j8pb.hd-bkt.clouddn.com/' + this.setmeal.img;
                    //this.imgUrl = 'http://qjhg2j8pb.hd-bkt.clouddn.com/abc.jpg';
                }
            });
        }
    });
</script>
</body>